package org.ym.file.domain.model.node.common.download;

import org.ym.file.domain.common.enums.FileStoreType;

/**
 * @author ym
 */
public class FileUploadFactory {
    /**
     * 上传工厂
     * @param fileStoreType 存储类型
     * @return 存储执行器
     */
    public static UploadInterface getExecutor(FileStoreType fileStoreType) {
        switch (fileStoreType) {
            case NORMAL:
                return NormalUpload.getInstance();
            case ENCRYPTION:
                return EncryptUpload.getInstance();
            default:
                return null;
        }
    }
}
